<?php

namespace app\shop\model\order;

use app\shop\model\BaseModel;

class OrderEvaluateModel extends BaseModel
{
    protected $name = 'shop_order_evaluate';

    /**
     * 获取器：添加时间
     * @param $value
     * @return false|string
     * @noinspection PhpMissingReturnTypeInspection
     */
    public function getCreateTimeAttr($value)
    {
        if (!$value) return '';

        return date('Y-m-d', $value);
    }

    /**
     * 获取器：评价图片
     * @param $value
     * @return array|false|string[]
     * @noinspection PhpMissingReturnTypeInspection
     */
    public function getImagesAttr($value)
    {
        if (!$value) return [];

        return explode(',', $value);
    }
}